df_validate<- read_dta("data/data_validation.dta")
df_validate <-df_validate%>%
mutate(party2= as.factor(party2),
p4=as.factor(p4),
party2_no3s=as.factor(party2_no3s),
villian=as.factor(villian),
house=as.factor(house),
woman =as.factor(woman),
british =as.factor(british),
heroes=as.factor(heroes),
noheroes=as.factor(noheroes),
person= as.factor(person))
remove(list=ls())
#install.packages("pacman")
library(pacman)
p_load(here, tidyverse, haven, modelsummary, cregg, sjPlot,
list, ggpubr, survey, xtable, interactions, viridisLite,
ggdist, patchwork, estimatr, margins, doBy, modelr, plyr)
colorX<-c("#205C8A", "#E3256B")
colors <- viridis(option = "magma",
begin = 0.1,
end = .8,
direction = -1,
n = 9)
###TABLE B1 and B2###
dfRES <- read_dta("data/data_validate_respondents.dta")
dfUK<- dfRES %>%
filter(country==1)
dfUS<- dfRES %>%
filter(country==0)
dfUK <-dfUK%>%
mutate(party3= as.factor(party3),
sex=as.factor(sex),
sexorient=as.factor(sexorient),
degree=as.factor(degree),
ethnic2=as.factor(ethnic2),
ideoUS=as.factor(ideoUS),
ideoUK=as.factor(ideoUK))
datasummary_skim(dfUK, type="categorical", output="tables/Table_B1.tex")
dfUS <-dfUS%>%
mutate(USparty3= as.factor(USparty3),
sex=as.factor(sex),
sexorient=as.factor(sexorient),
degree=as.factor(degree),
ethnic2=as.factor(ethnic2),
ideoUS=as.factor(ideoUS),
ideoUS=as.factor(ideoUS))
datasummary_skim(dfUS, type="categorical", output="tables/Table_B2.tex")
###TABLE B3###
df_validate<- read_dta("data/data_validation.dta")
df_validate <-df_validate%>%
mutate(party2= as.factor(party2),
p4=as.factor(p4),
party2_no3s=as.factor(party2_no3s),
villian=as.factor(villian),
house=as.factor(house),
woman =as.factor(woman),
british =as.factor(british),
heroes=as.factor(heroes),
noheroes=as.factor(noheroes),
person= as.factor(person))
df_validate$party2_no3s <- factor(df_validate$party2_no3s,
levels = c(0,1),
labels = c("Cons/Rep", "Lab/Dem"))
df_validate$woman <- factor(df_validate$woman,
levels = c(0,1),
labels = c("Man", "Woman"))
df_validate$british <- factor(df_validate$british,
levels = c(0,1),
labels = c("Not British", "British"))
df_validate$villian <- factor(df_validate$villian,
levels = c(0,1),
labels = c("Hero", "Villain"))
df_validate$house <- factor(df_validate$house,
levels = c(1,2,3,4,5,6),
labels = c("Disney", "Game of Thrones", "Harry Potter", "Lord of the Ring", "Marvel", "Star Wars"))
df_validate$heroes <- factor(df_validate$heroes,
levels = c(1,2,3,4,5,6,7,8,9,10,
11,12,13,14,15,16,17,18,19,20,
21,22,23,24,25,26,27,28,29,30,
31,32,33,34,35,36,37,38,39,40,
41,42,43),
labels = c("Aladdin", "Albus Dumbledore", "Aragorn (strider)", "Arthur Weasley", "Arya Stark", "Bilbo Baggins", "Black Widow (Natasha Romanoff)", "Brienne of Tarth", "Captain America (Steve Rogers)", "Captain Marvel", "Catelynn Stark", "Cinderella", "Dobby", "Eddard Stark", "Galadriel", "Gandalf the White", "Harry Potter", "Hercules", "Hermione Granger", "Ironman (Tony Stark)", "Kristoff", "Luke Skywalker", "Mighty Thor","Molly Weasley", "Okoye", "Princess Aurora", "Princess Fiona", "PrincessLea", "Princess Tiana", "Prof. Minerva McGonagall", "Quasimodo", "Rey Palpatine", "Rocket", "Ronald Weasley", "Simba",
"Snow White","Spiderman", "Tarzan", "Thor", "Valkyrie", "Wanda Maximoff", "Yoda", "Éowyn"))
df_validate$noheroes <- factor(df_validate$noheroes,
levels = c(1,2,3,4,5,6,7,8,9,10,
11,12,13,14,15,16,17,18,19,20,
21,22,23,24,25,26,27,28,29,30,
31,32,33,34,35,36,37,38,39,40,
41,42,43),
labels = c("Agatha Harkness", "Azog", "Bellatrix Lestrange", "Captain Phasma", "Cersei Lannister", "Cruella de Vil", "Darth Maul", "Darth Vader", "Dolores Umbridge", "Dr Facilier", "Draco Malfoy", "Ebony Maw", "Fairy Godmother (Shrek)", "Gaston", "Gorr", "Gríma Wormtongue", "Hades", "Hela", "Joffrey Baratheon", "King Pin", "Kylo Ren", "Lady Tremaine", "Loki", "Lucius Malfoy", "Lurtz", "Maleficent", "Mother Gothel", "Narcissa Malfoy", "Pansy Parkinson", "Petunia Dursley", "Proxima Midnight", "Queen Grimhilde", "Queen of Hearts", "Red Skull (Johann Schmidt)", "Rita Skeeter", "Ronan the Accuser",
"Roose Bolton", "Saruman the Wise", "Scar", "Thanos", "Tywin Lannister", "Ultron", "Ursula"))
hero_all <- cj(df_validate, villnormal ~ heroes, id = ~ IDvar,
estimate = "mm")
remove(list=ls())
#install.packages("pacman")
library(pacman)
p_load(here, tidyverse, haven, modelsummary, cregg, sjPlot,
list, ggpubr, survey, xtable, interactions, viridisLite,
ggdist, patchwork, estimatr, margins, doBy, modelr, plyr)
colorX<-c("#205C8A", "#E3256B")
colors <- viridis(option = "magma",
begin = 0.1,
end = .8,
direction = -1,
n = 9)
###TABLE B1 and B2###
dfRES <- read_dta("data/data_validate_respondents.dta")
dfUK<- dfRES %>%
filter(country==1)
dfUS<- dfRES %>%
filter(country==0)
dfUK <-dfUK%>%
mutate(party3= as.factor(party3),
sex=as.factor(sex),
sexorient=as.factor(sexorient),
degree=as.factor(degree),
ethnic2=as.factor(ethnic2),
ideoUS=as.factor(ideoUS),
ideoUK=as.factor(ideoUK))
datasummary_skim(dfUK, type="categorical", output="tables/Table_B1.tex")
dfUS <-dfUS%>%
mutate(USparty3= as.factor(USparty3),
sex=as.factor(sex),
sexorient=as.factor(sexorient),
degree=as.factor(degree),
ethnic2=as.factor(ethnic2),
ideoUS=as.factor(ideoUS),
ideoUS=as.factor(ideoUS))
datasummary_skim(dfUS, type="categorical", output="tables/Table_B2.tex")
###TABLE B3###
df_validate<- read_dta("data/data_validation.dta")
df_validate <-df_validate%>%
mutate(party2= as.factor(party2),
p4=as.factor(p4),
party2_no3s=as.factor(party2_no3s),
villian=as.factor(villian),
house=as.factor(house),
woman =as.factor(woman),
british =as.factor(british),
heroes=as.factor(heroes),
noheroes=as.factor(noheroes),
person= as.factor(person))
df_validate$party2_no3s <- factor(df_validate$party2_no3s,
levels = c(0,1),
labels = c("Cons/Rep", "Lab/Dem"))
df_validate$woman <- factor(df_validate$woman,
levels = c(0,1),
labels = c("Man", "Woman"))
df_validate$british <- factor(df_validate$british,
levels = c(0,1),
labels = c("Not British", "British"))
df_validate$villian <- factor(df_validate$villian,
levels = c(0,1),
labels = c("Hero", "Villain"))
df_validate$house <- factor(df_validate$house,
levels = c(1,2,3,4,5,6),
labels = c("Disney", "Game of Thrones", "Harry Potter", "Lord of the Ring", "Marvel", "Star Wars"))
df_validate$heroes <- factor(df_validate$heroes,
levels = c(1,2,3,4,5,6,7,8,9,10,
11,12,13,14,15,16,17,18,19,20,
21,22,23,24,25,26,27,28,29,30,
31,32,33,34,35,36,37,38,39,40,
41,42,43),
labels = c("Aladdin", "Albus Dumbledore", "Aragorn (strider)", "Arthur Weasley", "Arya Stark", "Bilbo Baggins", "Black Widow (Natasha Romanoff)", "Brienne of Tarth", "Captain America (Steve Rogers)", "Captain Marvel", "Catelynn Stark", "Cinderella", "Dobby", "Eddard Stark", "Galadriel", "Gandalf the White", "Harry Potter", "Hercules", "Hermione Granger", "Ironman (Tony Stark)", "Kristoff", "Luke Skywalker", "Mighty Thor","Molly Weasley", "Okoye", "Princess Aurora", "Princess Fiona", "PrincessLea", "Princess Tiana", "Prof. Minerva McGonagall", "Quasimodo", "Rey Palpatine", "Rocket", "Ronald Weasley", "Simba",
"Snow White","Spiderman", "Tarzan", "Thor", "Valkyrie", "Wanda Maximoff", "Yoda", "Éowyn"))
df_validate$noheroes <- factor(df_validate$noheroes,
levels = c(1,2,3,4,5,6,7,8,9,10,
11,12,13,14,15,16,17,18,19,20,
21,22,23,24,25,26,27,28,29,30,
31,32,33,34,35,36,37,38,39,40,
41,42,43),
labels = c("Agatha Harkness", "Azog", "Bellatrix Lestrange", "Captain Phasma", "Cersei Lannister", "Cruella de Vil", "Darth Maul", "Darth Vader", "Dolores Umbridge", "Dr Facilier", "Draco Malfoy", "Ebony Maw", "Fairy Godmother (Shrek)", "Gaston", "Gorr", "Gríma Wormtongue", "Hades", "Hela", "Joffrey Baratheon", "King Pin", "Kylo Ren", "Lady Tremaine", "Loki", "Lucius Malfoy", "Lurtz", "Maleficent", "Mother Gothel", "Narcissa Malfoy", "Pansy Parkinson", "Petunia Dursley", "Proxima Midnight", "Queen Grimhilde", "Queen of Hearts", "Red Skull (Johann Schmidt)", "Rita Skeeter", "Ronan the Accuser",
"Roose Bolton", "Saruman the Wise", "Scar", "Thanos", "Tywin Lannister", "Ultron", "Ursula"))
hero_all <- cj(df_validate, villnormal ~ heroes, id = ~ IDvar,
estimate = "mm")
hero_all<- hero_all %>%
dplyr::select(estimate, level)
names(hero_all)[names(hero_all) == "estimate"] <- "mean_all"
hero1 <- cj(df_validate, villnormal ~ heroes, id = ~ IDvar,
estimate = "mm", by = ~ party2_no3s)
hero_left<- hero1 %>%
filter(BY=="Lab/Dem")
hero_left<- hero_left %>%
dplyr::select(estimate, level)
names(hero_left)[names(hero_left) == "estimate"] <- "mean_left"
hero_right<- hero1 %>%
filter(BY=="Cons/Rep")
hero_right<- hero_right %>%
dplyr::select(estimate, level)
names(hero_right)[names(hero_right) == "estimate"] <- "mean_right"
merged_hero <- full_join(hero_all, hero_left, by = "level")
merged_hero <- full_join(merged_hero, hero_right, by = "level")
merged_hero$validated <- ifelse(merged_hero$mean_all < 0.5, "yes", "no")
merged_hero$partisans_agree <- ifelse(merged_hero$mean_left < 0.5 & merged_hero$mean_right < 0.5, "yes", "no")
villain_all <- cj(df_validate, villnormal ~ noheroes, id = ~ IDvar,
estimate = "mm")
villain_all<- villain_all %>%
dplyr::select(estimate, level)
names(villain_all)[names(villain_all) == "estimate"] <- "mean_all"
villain1 <- cj(df_validate, villnormal ~ noheroes, id = ~ IDvar,
estimate = "mm", by = ~ party2_no3s)
villain_left<- villain1 %>%
filter(BY=="Lab/Dem")
villain_left<- villain_left %>%
dplyr::select(estimate, level)
names(villain_left)[names(villain_left) == "estimate"] <- "mean_left"
villain_right<- villain1 %>%
filter(BY=="Cons/Rep")
villain_right<- villain_right %>%
dplyr::select(estimate, level)
names(villain_right)[names(villain_right) == "estimate"] <- "mean_right"
merged_villain<- full_join(villain_all, villain_left, by = "level")
merged_villain <- full_join(merged_villain, villain_right, by = "level")
merged_villain$validated <- ifelse(merged_villain$mean_all > 0.5, "yes", "no")
merged_villain$partisans_agree <- ifelse(merged_villain$mean_left > 0.5 & merged_villain$mean_right > 0.5, "yes", "no")
merged_villain$partisans_agree[merged_villain$level == "Fairy Godmother (Shrek)"] <- "yes"
full_validate<-rbind(merged_hero, merged_villain)
full_validate <- full_validate %>%
mutate(profile_category = case_when(
mean_all < 0.25 ~ "Strong hero",
mean_all >= 0.25 & mean_all < 0.5 ~ "Hero",
mean_all >= 0.5 & mean_all <= 0.75 ~ "Villain",
mean_all > 0.75 ~ "Strong villain"
))
full_validate <- full_validate[c("level", "mean_all", "validated", "profile_category", "mean_left", "mean_right", "partisans_agree")]
latex_table <- xtable(full_validate)
output_file <- "tables/Table_B3.tex"
print(latex_table, file = output_file, include.rownames = FALSE)
#---- Primary replication script ----
#Turnbull-Dugarte and Wagner (2024)
#"Heroes & villains: motivated projection of political identities"
# README: This single script will reproduce all analysis and output from the main text and supplementary appendix files,
# and produces six .html files of the log output form each.
# Scripts 1 & 2 should be run in consecutive order; Scrips 3 & 4 should be run in consecutive order.
library(knitr)
rmarkdown::render("script1_study1_main.R")
#---- Primary replication script ----
#Turnbull-Dugarte and Wagner (2024)
#"Heroes & villains: motivated projection of political identities"
# README: This single script will reproduce all analysis and output from the main text and supplementary appendix files,
# and produces six .html files of the log output form each.
# Scripts 1 & 2 should be run in consecutive order; Scrips 3 & 4 should be run in consecutive order.
library(knitr)
rmarkdown::render("script1_study1_main.R")
#---- Primary replication script ----
#Turnbull-Dugarte and Wagner (2024)
#"Heroes & villains: motivated projection of political identities"
# README: This single script will reproduce all analysis and output from the main text and supplementary appendix files,
# and produces six .html files of the log output form each.
# Scripts 1 & 2 should be run in consecutive order; Scrips 3 & 4 should be run in consecutive order.
library(knitr)
rmarkdown::render("script1_study1_main.R")
#---- Primary replication script ----
#Turnbull-Dugarte and Wagner (2024)
#"Heroes & villains: motivated projection of political identities"
# README: This single script will reproduce all analysis and output from the main text and supplementary appendix files,
# and produces six .html files of the log output form each.
# Scripts 1 & 2 should be run in consecutive order; Scrips 3 & 4 should be run in consecutive order.
library(knitr)
rmarkdown::render("script1_study1_main.R")
#---- Primary replication script ----
#Turnbull-Dugarte and Wagner (2024)
#"Heroes & villains: motivated projection of political identities"
# README: This single script will reproduce all analysis and output from the main text and supplementary appendix files,
# and produces six .html files of the log output form each.
# Scripts 1 & 2 should be run in consecutive order; Scrips 3 & 4 should be run in consecutive order.
library(knitr)
rmarkdown::render("script1_study1_main.R")
#---- Primary replication script ----
#Turnbull-Dugarte and Wagner (2024)
#"Heroes & villains: motivated projection of political identities"
# README: This single script will reproduce all analysis and output from the main text and supplementary appendix files,
# and produces six .html files of the log output form each.
# Scripts 1 & 2 should be run in consecutive order; Scrips 3 & 4 should be run in consecutive order.
library(knitr)
rmarkdown::render("script1_study1_main.R")
rmarkdown::render("script2_study1_appendix.R")
rmarkdown::render("script3_study2_main.R")
rmarkdown::render("script4_study2_appendix.R")
rmarkdown::render("script5_validation_study.R")
rmarkdown::render("script6_appendix_misc.R")
rmarkdown::render("script6_appendix_misc.R")
#---- Primary replication script ----
#Turnbull-Dugarte and Wagner (2024)
#"Heroes & villains: motivated projection of political identities"
# README: This single script will reproduce all analysis and output from the main text and supplementary appendix files,
# and produces six .html files of the log output form each.
# Scripts 1 & 2 should be run in consecutive order; Scrips 3 & 4 should be run in consecutive order.
library(knitr)
rmarkdown::render("script1_study1_main.R")
rmarkdown::render("script2_study1_appendix.R")
rmarkdown::render("script3_study2_main.R")
rmarkdown::render("script4_study2_appendix.R")
rmarkdown::render("script5_validation_study.R")
rmarkdown::render("script6_appendix_misc.R")
#---- Primary replication script ----
#Turnbull-Dugarte and Wagner (2024)
#"Heroes & villains: motivated projection of political identities"
# README: This single script will reproduce all analysis and output from the main text and supplementary appendix files,
# and produces six .html files of the log output form each.
# Scripts 1 & 2 should be run in consecutive order; Scrips 3 & 4 should be run in consecutive order.
library(knitr)
rmarkdown::render("script1_study1_main.R")
rmarkdown::render("script2_study1_appendix.R")
rmarkdown::render("script3_study2_main.R")
rmarkdown::render("script4_study2_appendix.R")
rmarkdown::render("script5_validation_study.R")
rmarkdown::render("script6_appendix_misc.R")
remove(list=ls())
#install.packages("pacman")
library(pacman)
p_load(here, tidyverse, haven, modelsummary, cregg, sjPlot,
list, ggpubr, survey, xtable, interactions, viridisLite,
ggdist, patchwork, estimatr, margins, doBy, modelr, plyr)
colors2 <- c("#56B4E9", "#C5407EFF")
colors <- viridis(option = "magma",
begin = 0.1,
end = .8,
direction = -1,
n = 9)
###LOADING AND CLEANING US DATA###
dfUS <- read_dta("data/study1_USdata.dta")
dfUS <-dfUS%>%
mutate(res_party2= as.factor(res_party2),
IDstrength=as.factor(IDstrength),
strengthOG=as.factor(strengthOG),
ideo3_self=as.factor(ideo3_self),
ideo3_char=as.factor(ideo3_char),
extreme=as.factor(extreme),
strongdislike=as.factor(strongdislike),
partynegaffectcat=as.factor(partynegaffectcat),
IDasked=as.factor(IDasked),
villian=as.factor(villian),
villiannum=as.numeric(villian),
house=as.factor(house),
woman =as.factor(woman),
british =as.factor(british),
heroes=as.factor(heroes),
noheroes=as.factor(noheroes),
imdb_quartiles=as.factor(imdb_quartiles),
engagement_quartiles=as.factor(engagement_quartiles),
person= as.factor(person),
LGBT= as.factor(LGBT),
sex= as.factor(sex),
degree= as.factor(degree))
dfUS$res_party2 <- factor(dfUS$res_party2,
levels = c(0,1),
labels = c("Republicans", "Democrats"))
dfUS$IDasked <- factor(dfUS$IDasked,
levels = c(0,1),
labels = c("Out-group named", "In-group named"))
dfUS$strengthOG <- factor(dfUS$strengthOG,
levels = c(1,2,3),
labels = c("1. Very strong", "2. Fairly strong", "3. Not very strong"))
dfUS$strengthdummy <- factor(dfUS$strengthdummy,
levels = c(0,1),
labels = c("Not at all strong", "Very strong"))
dfUS$IDstrength <- factor(dfUS$IDstrength,
levels = c(1,2,3,4),
labels = c("1. Very strong", "2. Fairly strong", "3. Not very strong", "4. Squeezed"))
dfUS$extreme <- factor(dfUS$extreme,
levels = c(0,1,2),
labels = c("Centrist", "Ideologically moderate", "Ideologically radical"))
dfUS$strongdislike <- factor(dfUS$strongdislike,
levels = c(0,1),
labels = c("Below mean negative out-group affect", "Above mean negative out-group affect"))
dfUS$partynegaffectcat <- factor(dfUS$partynegaffectcat,
levels = c(0,1,2,3),
labels = c("Republican with low Democrat hate", "Republican with strong Democrat hate", "Democrat with low Republican hate", "Democrat with strong Repeublican hate"))
dfUS$woman <- factor(dfUS$woman,
levels = c(0,1),
labels = c("Man", "Woman"))
dfUS$british <- factor(dfUS$british,
levels = c(0,1),
labels = c("Not British", "British"))
dfUS$villian <- factor(dfUS$villian,
levels = c(0,1),
labels = c("Hero", "Villain"))
dfUS$villiancat <- factor(dfUS$villiancat,
levels = c(0,1,2,3),
labels = c("Strong Hero", "Hero", "Villain", "Strong Villain"))
dfUS$house <- factor(dfUS$house,
levels = c(1,2,3,4,5,6),
labels = c("Disney", "Game of Thrones", "Harry Potter", "Lord of the Ring", "Marvel", "Star Wars"))
dfUS$imdb_quartiles <- factor(dfUS$imdb_quartiles,
levels = c(1,2,3,4),
labels = c("Rating Q1", "Rating Q2", "Rating Q3", "Rating Q4"))
dfUS$engagement_quartiles <- factor(dfUS$engagement_quartiles,
levels = c(1,2,3,4),
labels = c("Enagement Q1", "Enagement Q2", "Enagement Q3", "Enagement Q4"))
dfUS$heroes <- factor(dfUS$heroes,
levels = c(1,2,3,4,5,6,7,8,9,10,
11,12,13,14,15,16,17,18,19,20,
21,22,23,24,25,26,27,28,29,30,
31,32,33,34,35,36,37,38,39,40,
41,42,43),
labels = c("Aladdin", "Albus Dumbledore", "Aragorn", "Arthur Weasley", "Arya Stark", "Bilbo Baggins", "Black Widow", "Brienne of Tarth", "Captain America", "Captain Marvel", "Catelynn Stark", "Cinderella", "Dobby", "Eddard Stark", "Galadriel", "Gandalf the White", "Harry Potter", "Hercules", "Hermione Granger", "Ironman", "Kristoff", "Luke Skywalker", "Mighty Thor","Molly Weasley", "Okoye", "Princess Aurora", "Princess Fiona", "Princess Lea", "Princess Tiana", "Prof. Minerva McGonagall", "Quasimodo", "Rey Palpatine", "Rocket", "Ronald Weasley", "Simba",
"Snow White","Spiderman", "Tarzan", "Thor", "Valkyrie", "Wanda Maximoff", "Yoda", "Éowyn"))
dfUS$noheroes <- factor(dfUS$noheroes,
levels = c(1,2,3,4,5,6,7,8,9,10,
11,12,13,14,15,16,17,18,19,20,
21,22,23,24,25,26,27,28,29,30,
31,32,33,34,35,36,37,38,39,40,
41,42,43),
labels = c("Agatha Harkness", "Azog", "Bellatrix Lestrange", "Captain Phasma", "Cersei Lannister", "Cruella de Vil", "Darth Maul", "Darth Vader", "Dolores Umbridge", "Dr Facilier", "Draco Malfoy", "Ebony Maw", "Fairy Godmother (Shrek)", "Gaston", "Gorr", "Gríma Wormtongue", "Hades", "Hela", "Joffrey Baratheon", "King Pin", "Kylo Ren", "Lady Tremaine", "Loki", "Lucius Malfoy", "Lurtz", "Maleficent", "Mother Gothel", "Narcissa Malfoy", "Pansy Parkinson", "Petunia Dursley", "Proxima Midnight", "Queen Grimhilde", "Queen of Hearts", "Red Skull (Johann Schmidt)", "Rita Skeeter", "Ronan the Accuser",
"Roose Bolton", "Saruman the Wise", "Scar", "Thanos", "Tywin Lannister", "Ultron", "Ursula"))
labels <- c(villian = "Hero vs Villain", villiancat = "Hero vs. Villain", woman = "Sex",
house = "Media Franchise", british = "British typecast",
imdb_quartiles = "IMDB Review", engagement_quartiles= "IDMB engagment")
###LOADING AND CLEANING UK DATA###
dfUK <- read_dta("data/study1_UKdata.dta")
dfUK <-dfUK%>%
mutate(res_party2= as.factor(res_party2),
IDstrength=as.factor(IDstrength),
strengthOG=as.factor(strengthOG),
ideo3_self=as.factor(ideo3_self),
RILEself=as.factor(RILEself),
ideo3_char=as.factor(ideo3_char),
extreme=as.factor(extreme),
IDasked=as.factor(IDasked),
strongdislike=as.factor(strongdislike),
partynegaffectcat=as.factor(partynegaffectcat),
villian=as.factor(villian),
villiannum=as.numeric(villian),
house=as.factor(house),
woman =as.factor(woman),
british =as.factor(british),
heroes=as.factor(heroes),
noheroes=as.factor(noheroes),
imdb_quartiles=as.factor(imdb_quartiles),
engagement_quartiles=as.factor(engagement_quartiles),
partyIDcat=as.factor(partyIDcat),
person= as.factor(person),
LGBT= as.factor(LGBT),
sex= as.factor(sex),
degree= as.factor(degree))
dfUK$res_party2 <- factor(dfUK$res_party2,
levels = c(0,1),
labels = c("Conservative", "Labour"))
dfUK$IDasked <- factor(dfUK$IDasked,
levels = c(0,1),
labels = c("Out-group named", "In-group named"))
dfUK$ideo3_self <- factor(dfUK$ideo3_self,
levels = c(0,1,2),
labels = c("Left", "Moderate", "Right"))
dfUK$extreme <- factor(dfUK$extreme,
levels = c(0,1,2),
labels = c("Centrist", "Ideologically moderate", "Ideologically radical"))
dfUK$partyIDcat <- factor(dfUK$partyIDcat,
levels = c(0,1,2,3,4),
labels = c("Conservative", "Labour", "Lib Dem", "Green/SNP/Plaid Cymru", "Reform UK (Brexit party)"))
dfUK$strengthOG <- factor(dfUK$strengthOG,
levels = c(1,2,3),
labels = c("1. Very strong", "2. Fairly strong", "3. Not very strong"))
dfUK$IDstrength <- factor(dfUK$IDstrength,
levels = c(1,2,3,4),
labels = c("1. Very strong", "2. Fairly strong", "3. Not very strong", "4. Squeezed"))
dfUK$strengthdummy <- factor(dfUK$strengthdummy,
levels = c(0,1),
labels = c("Not at all strong", "Very strong"))
dfUK$partynegaffectcat <- factor(dfUK$partynegaffectcat,
levels = c(0,1,2,3),
labels = c("Conservative with low Labour hate", "Conservative with strong Labour hate", "Labour with low Conservative hate", "Labour with strong Conservative hate"))
dfUK$strongdislike <- factor(dfUK$strongdislike,
levels = c(0,1),
labels = c("Below mean negative out-group affect", "Above mean negative out-group affect"))
dfUK$woman <- factor(dfUK$woman,
levels = c(0,1),
labels = c("Man", "Woman"))
dfUK$british <- factor(dfUK$british,
levels = c(0,1),
labels = c("Not British", "British"))
dfUK$queer <- factor(dfUK$queer,
levels = c(0,1),
labels = c("Cishetero", "LGBT+"))
dfUK$villian <- factor(dfUK$villian,
levels = c(0,1),
labels = c("Hero", "Villain"))
dfUK$villiancat <- factor(dfUK$villiancat,
levels = c(0,1,2,3),
labels = c("Strong Hero", "Hero", "Villain", "Strong Villain"))
dfUK$house <- factor(dfUK$house,
levels = c(1,2,3,4,5,6),
labels = c("Disney", "Game of Thrones", "Harry Potter", "Lord of the Ring", "Marvel", "Star Wars"))
dfUK$imdb_quartiles <- factor(dfUK$imdb_quartiles,
levels = c(1,2,3,4),
labels = c("Rating Q1", "Rating Q2", "Rating Q3", "Rating Q4"))
dfUK$engagement_quartiles <- factor(dfUK$engagement_quartiles,
levels = c(1,2,3,4),
labels = c("Enagement Q1", "Enagement Q2", "Enagement Q3", "Enagement Q4"))
dfUK$heroes <- factor(dfUK$heroes,
levels = c(1,2,3,4,5,6,7,8,9,10,
11,12,13,14,15,16,17,18,19,20,
21,22,23,24,25,26,27,28,29,30,
31,32,33,34,35,36,37,38,39,40,
41,42,43),
labels = c("Aladdin", "Albus Dumbledore", "Aragorn", "Arthur Weasley", "Arya Stark", "Bilbo Baggins", "Black Widow", "Brienne of Tarth", "Captain America", "Captain Marvel", "Catelynn Stark", "Cinderella", "Dobby", "Eddard Stark", "Galadriel", "Gandalf the White", "Harry Potter", "Hercules", "Hermione Granger", "Ironman", "Kristoff", "Luke Skywalker", "Mighty Thor","Molly Weasley", "Okoye", "Princess Aurora", "Princess Fiona", "Princess Lea", "Princess Tiana", "Prof. Minerva McGonagall", "Quasimodo", "Rey Palpatine", "Rocket", "Ronald Weasley", "Simba",
"Snow White","Spiderman", "Tarzan", "Thor", "Valkyrie", "Wanda Maximoff", "Yoda", "Éowyn"))
dfUK$noheroes <- factor(dfUK$noheroes,
levels = c(1,2,3,4,5,6,7,8,9,10,
11,12,13,14,15,16,17,18,19,20,
21,22,23,24,25,26,27,28,29,30,
31,32,33,34,35,36,37,38,39,40,
41,42,43),
labels = c("Agatha Harkness", "Azog", "Bellatrix Lestrange", "Captain Phasma", "Cersei Lannister", "Cruella de Vil", "Darth Maul", "Darth Vader", "Dolores Umbridge", "Dr Facilier", "Draco Malfoy", "Ebony Maw", "Fairy Godmother (Shrek)", "Gaston", "Gorr", "Gríma Wormtongue", "Hades", "Hela", "Joffrey Baratheon", "King Pin", "Kylo Ren", "Lady Tremaine", "Loki", "Lucius Malfoy", "Lurtz", "Maleficent", "Mother Gothel", "Narcissa Malfoy", "Pansy Parkinson", "Petunia Dursley", "Proxima Midnight", "Queen Grimhilde", "Queen of Hearts", "Red Skull (Johann Schmidt)", "Rita Skeeter", "Ronan the Accuser",
"Roose Bolton", "Saruman the Wise", "Scar", "Thanos", "Tywin Lannister", "Ultron", "Ursula"))
labels <- c(villian = "Hero vs Villain", villiancat = "Hero vs. Villain", woman = "Sex",
house = "Media Franchise", british = "British typecast",
imdb_quartiles = "IMDB Review", engagement_quartiles= "IDMB engagment")
View(dfUK)
View(dfUS)
